home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / std_unix / archive / text0034.txt < prev    next >
Encoding:
Text File  |  1993-07-06  |  1.1 KB  |  35 lines

  1. Submitted-by: conklin@kaleida.com (J.T. Conklin)
  2.  
  3. I am unable to determine the "proper" behavior of the expr program
  4. from all of the specifications availiable to me (various man pages,
  5. and the X/Open Portability Guides).
  6.  
  7. All of the man pages contain something like this:
  8.  
  9.     expr | expr
  10.     Return the first expr if it is neither NULL nor 0, otherwise
  11.     returns    the second expr.
  12.  
  13.      expr & expr
  14.     Return the first expr if neither expr is NULL or 0, otherwise
  15.     returns 0.
  16.  
  17. Since expr will coerce a string into an interger in other contexts, I
  18. am wondering if a string like 0000 should be interpreted as zero?  All
  19. of the implementations (that worked at all) I've tried do not.
  20.  
  21. I've patched the broken versions (386BSD & GNU) to the traditional
  22. behavior, but I'm curious to know if the traditional behavior is
  23. actually incorrect.
  24.  
  25. --
  26. J.T. Conklin <jtc@wimsey.com>    | Your source for floppy distributions
  27.     Winning Strategies, Inc.     |    of the 386BSD OS and binaries
  28.     61 Crestwood Drive #18       | 
  29.     Daly City, CA 94015          | Send e-mail for complete product list
  30.  
  31.  
  32.  
  33. Volume-Number: Volume 31, Number 37
  34.  
  35.